Skip to content

Remote-first 2-row dashboard shell (admin-gated, experimental)#331

Merged
plusplusoneplusplus merged 9 commits into
mainfrom
coc/remote-first-shell
Jun 15, 2026
Merged

Remote-first 2-row dashboard shell (admin-gated, experimental)#331
plusplusoneplusplus merged 9 commits into
mainfrom
coc/remote-first-shell

Conversation

@plusplusoneplusplus

Copy link
Copy Markdown
Owner

Summary

Adds a remote-first two-row top navigation shell for the CoC dashboard (the "CoC Shell Redesign" — Native look, popover clone switch). It's an opt-in global admin setting (default off), so the current per-clone navigation is unchanged until enabled.

Enable via Admin → Configure → Features → Remote-first shell (features.remoteShell). Desktop-only; takes effect on reload.

What changed

Row 1 — RemoteTopBar (replaces RepoTabStrip when on): one tab per git remote (origin) via groupReposByRemote, with a color dot, clone-count chip, aggregate running pulse, and summed unseen badge. A top-level + add menu offers Add workspace folder, Add specific repository, and Clone repository.

Row 2 — RemoteSubBar (above a chromeless RepoDetail):

  • Remote scope (shared across clones, always shown): Work Items, Pull Requests.
  • Clone scope (follows the active checkout): a clone-switcher popover + the clone tabs (Activity, CLI Sessions, Git, Terminal, Explorer, Schedules, …) with responsive overflow — every tab that fits shows inline; the tail collapses into a menu (measured via a hidden mirror + ResizeObserver, active tab always kept visible).
  • Compact Ask / Queue actions pinned right, targeting the active clone.

Plumbing: reuses existing AppContext/QueueContext/ReposContext selection and Router hash routing; extracts RepoDetail's sub-tab visibility into a shared, tested repoSubTabs.ts (computeVisibleSubTabs); adds features.remoteShell to the unified admin registry (ADMIN_SETTING_DEFINITIONS + config defaults + RuntimeDashboardConfig.features), read client-side via useRemoteShellEnabled().

Reviewer notes

  • Off by default and desktop-only — classic nav is unchanged when the flag is off (chromeless defaults false; RepoTabStrip untouched).
  • SHOW_WIKI_TAB / SHOW_MEMORY_TAB moved from TopBar into featureFlags.ts (re-exported from TopBar for back-compat).
  • Updated the coc-knowledge dashboard-spa reference.

Tests

New unit/component tests under test/spa/react/remote-shell/ (shell model, tab partition, fit/overflow math, flag hook, RemoteTopBar, RemoteSubBar); updated existing source-scraping tests for the relocated tab logic; the generic admin-setting contract suite auto-covers the new flag. tsc (coc + coc-client), eslint, and client build are clean.

Also included

Two pre-existing local commits that were on main ahead of origin/main are bundled in at the author's request:

  • aa695ef8 refactor(coc): streamline imports and clean up unused code in prompt-builder.ts
  • 8f261de5 docs(AGENTS): update quick-start pointers and add hard invariant on branch switching

🤖 Generated with Claude Code

plusplusoneplusplus and others added 7 commits June 14, 2026 10:35
…builder.ts

- Removed duplicate import of Tool from coc-agent-sdk.
- Consolidated and organized imports for better readability.
- Updated return values in several functions to remove unnecessary suffix strings.
- Enhanced code clarity by removing commented-out code and unused variables.
Implements the "CoC Shell Redesign" top navigation as an opt-in,
remote-first shell. Default off; toggled via repo Settings -> Remote Shell
(localStorage `coc-remote-shell-enabled`). Desktop only; classic nav is
unchanged when the flag is off.

- RemoteTopBar (row 1): one tab per git remote via groupReposByRemote, with
  a clone-count chip, aggregate running pulse, and summed unseen badge.
- RemoteSubBar (row 2): remote-scope (Work Items, Pull Requests) | clone
  switcher popover | clone-scope tabs (Activity/Chats, CLI Sessions, Git,
  Terminal) | ... overflow (Explorer, Schedules, ...) | compact Ask/Queue.
- Reuses existing AppContext/Queue/Repos selection and Router hash routing;
  renders above a chromeless RepoDetail body.
- Extracts RepoDetail's sub-tab visibility logic into repoSubTabs.ts
  (computeVisibleSubTabs) shared by both surfaces; moves SHOW_WIKI_TAB /
  SHOW_MEMORY_TAB into featureFlags.ts (re-exported from TopBar).

Tests: 33 new unit/component tests (shell model, tab partition, flag hook,
RemoteTopBar, RemoteSubBar); updated 3 source-scraping tests for the relocated
tab logic. tsc, eslint, and client build all clean.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…ranch switching

Removed outdated quick-start pointers from the AGENTS.md file and added a new hard invariant stating that AI must never switch branches during operation. This enhances clarity and ensures adherence to best practices in the development process.
Promotes the remote-first shell from a per-repo / localStorage client flag
to a global `features.remoteShell` admin setting, toggled in
Admin -> Configure -> Features (Remote-first shell). Applies to the whole
deployment and takes effect on reload (no restart).

- Registry: adds features.remoteShell to ADMIN_SETTING_DEFINITIONS (auto-
  renders on the Features card), config.ts defaults, and the
  RuntimeDashboardConfig.features contract (remoteShellEnabled).
- Client: new useRemoteShellEnabled() reads the live flag via
  isRemoteShellEnabled() (utils/config), replacing the localStorage
  useRemoteShell hook; TopBar and ReposView consume it.
- Removes the per-repo Remote Shell select from RepoPreferencesSection.

Tests: replaces the localStorage hook test with useRemoteShellEnabled
coverage; the generic admin-setting contract suite auto-covers the new
definition. tsc (coc + coc-client), eslint, and client build are clean.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Show every clone-scoped sub-tab inline and collapse only the tabs that do
not fit into the ... overflow, instead of always hiding all but a fixed
primary set. Mirrors the repo tab strip's width-measurement approach.

- shellModel: partitionShellTabs now returns all non-remote tabs as the
  clone scope (no fixed overflow); adds computeVisibleTabKeys (pure,
  tested) to pick the tabs that fit and always keep the active one visible.
- RemoteSubBar: measures clone tabs against the available width via a
  hidden mirror + ResizeObserver and renders the overflow tail under ...

Tests: rewrites the partition test, adds computeVisibleTabKeys coverage,
updates the RemoteSubBar component test for the all-visible path.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The clone-switcher popover is per-origin, so the "Clone again / add
worktree" action living inside it was confusingly scoped. Move it to a
single top-level "+" button at the end of RemoteTopBar (row 1) that opens
CloneRepoDialog; the popover now just lists the remote's clones.

- RemoteTopBar: trailing "+" (remote-add-clone) opens CloneRepoDialog and
  refreshes repos on success.
- RemoteSubBar: drop the popover footer, the dialog, and the now-unused
  onRefresh prop (ReposView no longer passes it).

Tests: add the top-level add-clone test; drop the removed footer wiring.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The top-level "+" only offered Clone, which dropped the "Add workspace
folder" (register an existing local folder) and "Add specific repository"
actions the classic repo strip had. Make the "+" an add menu with all
three: Add workspace folder (AddFolderDialog), Add specific repository
(AddRepoDialog), Clone repository (CloneRepoDialog) — placed outside the
scroll container so the dropdown isn't clipped.

Tests: cover the add menu and the folder / clone dialog paths.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@plusplusoneplusplus plusplusoneplusplus enabled auto-merge (squash) June 15, 2026 00:58
plusplusoneplusplus and others added 2 commits June 14, 2026 18:16
- RepoDetail-mobile: update the desktop-header guard assertion for the new
  `!isMobile && !chromeless` condition (chromeless remote shell).
- config.test: add features.remoteShell to the all-overridden fixture and
  refresh the resolved-config inline snapshot for the new flag.
- chat-tool-builder / loop-tools-addon: drop assertions for the prompt-builder
  tool-guidance suffixes intentionally emptied in aa695ef (the tools
  themselves remain wired and asserted).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
PR #331 CI: 10 test files partially-mock featureFlags. Moving SHOW_WIKI_TAB
into it (so repoSubTabs could read it) made those mocks throw on the missing
export wherever repoSubTabs is transitively imported (e.g. AdminPanel,
ReposGrid). Move SHOW_WIKI_TAB / SHOW_MEMORY_TAB to a dedicated lightweight
navFlags.ts (re-exported from TopBar for BottomNav/Router); featureFlags.ts's
public surface is restored so the existing partial mocks keep working.

Also update executors-prompt-builder.test.ts for the search_conversations
suffix removed in aa695ef (the tools stay wired and asserted).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@plusplusoneplusplus plusplusoneplusplus merged commit ce2c972 into main Jun 15, 2026
36 checks passed
@plusplusoneplusplus plusplusoneplusplus deleted the coc/remote-first-shell branch June 15, 2026 01:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant